home *** CD-ROM | disk | FTP | other *** search
/ ShareWare OnLine 2 / ShareWare OnLine Volume 2 (CMS Software)(1993).iso / archiver / mta_vf35.zip / MTA__TEC.EXE / SUBST.TEC < prev    next >
Text File  |  1993-02-22  |  5KB  |  111 lines

  1. ------------------------------------------------------------------------
  2. Subject : Use of SUBST inside MTA
  3. Target  : New and advanced users
  4. Date    : 09-03-92
  5. Rev.    : 1.01 / 11-14/92 (added NOVELL example)
  6. ------------------------------------------------------------------------
  7.  
  8. In the early days the archive programs did only store path information
  9. in a relative way. If TEMP\WHY.EXE was included in the archive, it would
  10. unpack as .\TEMP\WHY.EXE (so as a directory UNDER the current one). At
  11. this moment there are two popular archive programs that (can) use
  12. ABSOLUTE directories. An entry like \TEMP\WHY.EXE would unpack as
  13. \TEMP\WHY.EXE, so WHY.EXE would be in the directory TEMP under the ROOT
  14. directory. Even this could be solved in a normal way but what if someone
  15. included \DOS\COMMAND.COM (or any other file) and under your OWN root
  16. you already have a \DOS (and a COMMAND.COM). This would result in
  17. (dangerous) overwritten files and worse, MTA would create a new archive
  18. with ALL files from \DOS (also those that were already there) and the
  19. called archive-program would delete all these files also (resulting in a
  20. non-bootable machine).
  21.  
  22. Why not allow for a virtual drive (my RAM-disk) that is really empty ?
  23. Simple, if the source archive contains absolute directories AND some
  24. nested archives (archives in archives) which in turn would also include
  25. absolute directories, the new archive would not look the same as the
  26. original archive, in fact, given a product that contains:
  27.  
  28. BLURB.CTL
  29. \BIN\BLURB.EXE
  30. BLURB286.ZIP       ---> contains \BIN\BLURB.EXE
  31. BLURB386.ZIP       ---> contains \BIN\BLURB.EXE
  32.  
  33. It would result in:
  34.  
  35. BLURB.CTL
  36. \BIN\BLURB.EXE  (the last of the three)
  37.  
  38. And the two other BLURB.EXE files (the XT and 286 files) were gone.
  39.  
  40. To overcome all these problems, MTA will map a substituted drive over
  41. the temporary directory (the temporary directory will become the root of
  42. this new drive) and will extract the files as normal. With nested
  43. archives, MTA will swap the substituted drive to the next temporary
  44. directory under the previous and again will assign this a the new root.
  45. In this way extraction can not overwrite your own files AND the target
  46. archive will be the same as before.
  47.  
  48. If you do NOT include the SUBSTDrive support, MTA will not be able to
  49. carry the directories over into the new archive. There are some related
  50. options (SubstOn, SUbstOff) that will even make it possible to use this
  51. mechanisme on networks that don't allow the usage of SUBST.EXE. In this
  52. case you can use the network-version of such a program (like MAP, PAGEDR
  53. and so on).
  54.  
  55. Unless you inform MTA, MTA will do the following sequence at startup,
  56. to make it sure that the environment works:
  57.  
  58. - MTA will create a temporary directory
  59.  
  60. - MTA will either:
  61.  
  62.   A) When you include the normal SUBST sequence (so SubstOn and SubstOff
  63.      options are NOT set:
  64.  
  65.      - Call SUBST.EXE as follows 'SUBST.EXE [newdrive:] [temppath]
  66.        Where [newdrive:] is the driveletter taken from the SubstDrive
  67.        option and [temppath] is the full directory-name for the
  68.        temporary directory (drive included);
  69.  
  70.      - MTA will test if the new drive is a REAL drive or a SUBST drive
  71.        (unless NoSubstTest was included in MTA.CTL). If it is NOT a
  72.        SUBST-drive, MTA will abort;
  73.  
  74.      - Call SUBST.EXE as follows 'SUBST.EXE [newdrive:] /D
  75.        Where [newdrive:] is the driveletter taken from the SubstDrive
  76.        option.
  77.  
  78.   B) When you include special options like SubstOn and SubstOff:
  79.  
  80.      - Call SubstOn program in the format you supplied with this option
  81.  
  82.      - MTA will test if the new drive is a REAL drive or a SUBST drive
  83.        (unless NoSubstTest was included in MTA.CTL). If it is NOT a
  84.        SUBST-drive, MTA will abort;
  85.  
  86.      - Call SubstOff program in the format you supplied with this option
  87.  
  88. - MTA will remove the temporary directory and will advance to the normal
  89.   conversion of files.
  90.  
  91. In networks (and special environments) it can be possible that even when
  92. you supplied the SubstOn and SubstOff parameters correctly, MTA will
  93. fail because the new drive returns as a REAL drive. To overcome this
  94. problem, you can include the NoSubstTest option (see MTA documentation)
  95. to ignore the test. This must be done with great care. If the new
  96. drive IS a real drive (containing files), the information on this drive
  97. will be lost with the first conversion ! If the drive is a virtual drive
  98. but reports as a real drive, everything will work fine !
  99.  
  100.  
  101. Finally a working example for NOVELL <tm> where you must use the special
  102. program MAP.EXE:
  103.  
  104. - SubstOn   F:\public\MAP.EXE root %DF = %PP
  105.  
  106. - SubstOff  F:\public\MAP.EXE DEL  %DF
  107.  
  108. - SubstDrive M
  109.  
  110. When MAP.EXE is F:\public\ and your substitution drive should be M.
  111.